//折线图
    var lineOption = {
    	color:["#1de5f2","#de4c14","#0edf4d"],   
        tooltip : {
            trigger: 'axis',
        },
        legend: {
            orient: 'horizontal',
            top:10,
            right:20,
           // data:lengend,
            textStyle:{
                color:'#fff'
            }
        },
        grid: {
            top:52,
            left: '4%',
            right: '4%',
            bottom: 20,
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap:false,
            splitLine:{    //grid区域分隔线
                show:false,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#2a3f7e"
                }
            },
            axisLabel: {  //坐标轴标签
                show: true,
                textStyle: {
                    color: '#c0d4da'
                }
            },
            axisTick: {
                show: true   //刻度线
            },
            axisLine:{
                show: true,   //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#c0d4da"
                }
            }
        },
        yAxis : {
            splitLine:{    //grid区域分隔线
                show:true,
                lineStyle: {
                    width:1,
                    type:"solid",
                    color:"#2a3f7e"
                }
            },
            axisTick: {
                show: true   //刻度线
            },
            axisLine: {
                show: true ,  //坐标轴轴线
                lineStyle: {
                    width:1,
                    color:"#c0d4da"
                }
            },
            axisLabel: {  //坐标轴标签
                show: true,
                color:"#c0d4da"
            },
        },
        series : [
            {
               // name:lengend[0],
                type:'line',
                symbol:'none',  //这句就是去掉点的
                smooth:true
               // data:data1
            },
            {
              //  name:lengend[1],
                type:'line',
                symbol:'none',  //这句就是去掉点的
                smooth:true
               // data:data2
            },
            {
              //  name:lengend[2],
                type:'line',
                symbol:'none',  //这句就是去掉点的
                smooth:true
              //  data:data3
            }
        ]
    };
    var lineChart = echarts.init(document.getElementById("techLine"))
    lineChart.setOption(lineOption);
    window.addEventListener("resize", function () {
        lineChart.resize();
    });


var line1data1=[1902,3327,5144,8854]
var line1data2=[1319,3108,3041,6322]
var line1data3=[611,1132,970,1849]
var line1lengend=["参培人数","风险数量","自评估总数量"]
var timeData= ['2014','2015','2016','2017']

lineOption.series[0].data=line1data1
lineOption.series[1].data=line1data2
lineOption.series[2].data=line1data3

lineOption.series[0].name=line1lengend[0]
lineOption.series[1].name=line1lengend[1]
lineOption.series[2].name=line1lengend[2]

lineOption.legend.data=line1lengend
lineOption.xAxis.data=timeData
lineChart.setOption(lineOption);


$(".right_content_top .tabType li").click(function(){
	$(this).addClass("active").siblings().removeClass("active")
	var index=$(this).index()
	if(index==0){
		$("#mySelect3").hide()
		 line1data1=[1902,3327,5144,8854]
		 line1data2=[1319,3108,3041,6322]
		 line1data3=[611,1132,970,1849]
		 line1lengend=["参培人数","风险数量","自评估总数量"]
		 timeData= ['2014','2015','2016','2017']
	}
	else if(index==1){
		$("#mySelect3").show()
		 line1data1=[171,245,714]
		 line1data2_=[256,678,883]
		 line1data3=[184,396,305]
		 line1lengend=["电信","移动","联通"]
		 timeData= ['自评估总数量','风险数量','参培人数']
	}
	lineOption.series[0].data=line1data1
	lineOption.series[1].data=line1data2
	lineOption.series[2].data=line1data3

	lineOption.series[0].name=line1lengend[0]
	lineOption.series[1].name=line1lengend[1]
	lineOption.series[2].name=line1lengend[2]

	lineOption.legend.data=line1lengend
	lineOption.xAxis.data=timeData
	lineChart.setOption(lineOption);
})

$("#mySelect3").change(function(){
	var index = $(this).val();
	if(index == "2014"){
		 line1data1=[171,245,714]
		 line1data2_=[256,678,883]
		 line1data3=[184,396,305]
	}else if(index == "2015"){
		 line1data1=[314,911,1213]
		 line1data2=[489,1520,1794]
		 line1data3=[32,677,320]
	}else if(index == "2016"){
		 line1data1=[291,1011,1798]
		 line1data2=[431,1449,2785]
		 line1data3=[248,581,561]
    }else if(index == "2017"){
		 line1data1=[640,2064,3297]
		 line1data2=[771,3100,4502]
		 line1data3=[438,1158,1055]
    }
	
	lineOption.series[0].data=line1data1
	lineOption.series[1].data=line1data2
	lineOption.series[2].data=line1data3

	lineOption.series[0].name=line1lengend[0]
	lineOption.series[1].name=line1lengend[1]
	lineOption.series[2].name=line1lengend[2]

	lineOption.legend.data=line1lengend
	lineOption.xAxis.data=timeData
	lineChart.setOption(lineOption);
})


//地图
//2014 电信
var mapData2014_dx=[
	{name:'安徽',value:8 },
	{name:'北京',value:4 },
	{name:'福建',value:9 },
	{name:'甘肃',value:1 },
	{name:'广东',value:20},
	{name:'广西',value:8 },
	{name:'贵州',value:0 },
	{name:'海南',value:2 },
	{name:'河北',value:1 },
	{name:'河南',value:4 },
	{name:'黑龙江',value:19},
	{name:'湖北',value:7 },
	{name:'湖南',value:12},
	{name:'吉林',value:5 },
	{name:'江苏',value:7 },
	{name:'江西',value:3 },
	{name:'辽宁',value:1 },
	{name:'内蒙古',value:5 },
	{name:'宁夏',value:2 },
	{name:'青海',value:1 },
	{name:'山东',value:1 },
	{name:'山西',value:0 },
	{name:'陕西',value:7 },
	{name:'上海',value:7 },
	{name:'四川',value:4 },
	{name:'天津',value:8 },
	{name:'西藏',value:4 },
	{name:'新疆',value:3 },
	{name:'云南',value:8 },
	{name:'浙江',value:5 },
	{name:'重庆',value:5 },
]
//2014 联通
var mapData2014_lt=[
	{name:'安徽',value:3 },
	{name:'北京',value:10},
	{name:'福建',value:4 },
	{name:'广西',value:5 },
	{name:'贵州',value:2 },
	{name:'海南',value:1 },
	{name:'河北',value:6 },
	{name:'河南',value:9 },
	{name:'黑龙江',value:6 },
	{name:'湖南',value:8 },
	{name:'吉林',value:3 },
	{name:'江苏',value:12},
	{name:'江西',value:5 },
	{name:'辽宁',value:6 },
	{name:'内蒙古',value:7 },
	{name:'宁夏',value:12},
	{name:'青海',value:1 },
	{name:'山东',value:3 },
	{name:'山西',value:17},
	{name:'重庆',value:11},
	{name:'陕西',value:1 },
	{name:'上海',value:9 },
	{name:'四川',value:5 },
	{name:'天津',value:6 },
	{name:'浙江',value:1 },
	{name:'新疆',value:6 },
	{name:'湖北',value:17},
	{name:'甘肃',value:1 },
	{name:'云南',value:1 },
	{name:'广东',value:3 },
	{name:'西藏',value:3 },
]
//2014 移动
var mapData2014_yd=[
	{name:'北京',value:14},
	{name:'天津',value:3 },
	{name:'河北',value:6 },
	{name:'山西',value:6 },
	{name:'内蒙古',value:9 },
	{name:'辽宁',value:9 },
	{name:'吉林',value:6 },
	{name:'黑龙江',value:9 },
	{name:'上海',value:10},
	{name:'江苏',value:5 },
	{name:'浙江',value:8 },
	{name:'安徽',value:7 },
	{name:'福建',value:3 },
	{name:'江西',value:6 },
	{name:'山东',value:11},
	{name:'河南',value:8 },
	{name:'湖北',value:6 },
	{name:'湖南',value:8 },
	{name:'广东',value:5 },
	{name:'广西',value:2 },
	{name:'海南',value:5 },
	{name:'重庆',value:12},
	{name:'四川',value:35},
	{name:'贵州',value:21},
	{name:'云南',value:9 },
	{name:'西藏',value:4 },
	{name:'陕西',value:7 },
	{name:'甘肃',value:9 },
	{name:'宁夏',value:5 },
	{name:'青海',value:2 },
	{name:'新疆',value:6 },
]

//2015 电信
var mapData2015_dx=[
	{name:'安徽',value:23},
	{name:'北京',value:3 },
	{name:'福建',value:10},
	{name:'甘肃',value:8 },
	{name:'广东',value:12},
	{name:'广西',value:8 },
	{name:'贵州',value:7 },
	{name:'海南',value:5 },
	{name:'河北',value:6 },
	{name:'河南',value:4 },
	{name:'黑龙江',value:2 },
	{name:'湖北',value:6 },
	{name:'湖南',value:5 },
	{name:'吉林',value:1 },
	{name:'江苏',value:40},
	{name:'江西',value:6 },
	{name:'辽宁',value:8 },
	{name:'内蒙古',value:7 },
	{name:'宁夏',value:19},
	{name:'青海',value:4 },
	{name:'山东',value:8 },
	{name:'山西',value:4 },
	{name:'陕西',value:11},
	{name:'上海',value:14},
	{name:'四川',value:5 },
	{name:'天津',value:0 },
	{name:'西藏',value:11},
	{name:'新疆',value:6 },
	{name:'云南',value:9 },
	{name:'浙江',value:21},
	{name:'重庆',value:41},

]

//2015 联通
var mapData2015_lt=[
	{name:'安徽',value:5 },
	{name:'北京',value:12},
	{name:'福建',value:5 },
	{name:'广西',value:7 },
	{name:'贵州',value:4 },
	{name:'海南',value:6 },
	{name:'河北',value:33},
	{name:'河南',value:19},
	{name:'黑龙江',value:21},
	{name:'湖南',value:11},
	{name:'吉林',value:11},
	{name:'江苏',value:15},
	{name:'江西',value:3 },
	{name:'辽宁',value:21},
	{name:'内蒙古',value:14},
	{name:'宁夏',value:3 },
	{name:'青海',value:3 },
	{name:'山东',value:3 },
	{name:'山西',value:6 },
	{name:'重庆',value:9 },
	{name:'陕西',value:3 },
	{name:'上海',value:10},
	{name:'四川',value:16},
	{name:'天津',value:9 },
	{name:'浙江',value:8 },
	{name:'新疆',value:14},
	{name:'湖北',value:16},
	{name:'甘肃',value:10},
	{name:'云南',value:7 },
	{name:'广东',value:18},
	{name:'西藏',value:7 },
]

//2015 移动
var mapData2015_yd=[
	{name:'北京',value:20},
	{name:'天津',value:4 },
	{name:'河北',value:20},
	{name:'山西',value:10},
	{name:'内蒙古',value:14},
	{name:'辽宁',value:18},
	{name:'吉林',value:8 },
	{name:'黑龙江',value:15},
	{name:'上海',value:21},
	{name:'江苏',value:6 },
	{name:'浙江',value:14},
	{name:'安徽',value:8 },
	{name:'福建',value:8 },
	{name:'江西',value:7 },
	{name:'山东',value:19},
	{name:'河南',value:17},
	{name:'湖北',value:11},
	{name:'湖南',value:9 },
	{name:'广东',value:7 },
	{name:'广西',value:14},
	{name:'海南',value:7 },
	{name:'重庆',value:25},
	{name:'四川',value:67},
	{name:'贵州',value:48},
	{name:'云南',value:21},
	{name:'西藏',value:15},
	{name:'陕西',value:20},
	{name:'甘肃',value:16},
	{name:'宁夏',value:8 },
	{name:'青海',value:10},
	{name:'新疆',value:2 }
]

//2016 电信
var mapData2016_dx=[
	{name:'安徽',value:21},
	{name:'北京',value:3 },
	{name:'福建',value:6 },
	{name:'甘肃',value:12},
	{name:'广东',value:14},
	{name:'广西',value:14},
	{name:'贵州',value:6 },
	{name:'海南',value:7 },
	{name:'河北',value:10},
	{name:'河南',value:4 },
	{name:'黑龙江',value:2 },
	{name:'湖北',value:5 },
	{name:'湖南',value:7 },
	{name:'吉林',value:4 },
	{name:'江苏',value:29},
	{name:'江西',value:6 },
	{name:'辽宁',value:16},
	{name:'内蒙古',value:1 },
	{name:'宁夏',value:6 },
	{name:'青海',value:5 },
	{name:'山东',value:3 },
	{name:'山西',value:3 },
	{name:'陕西',value:15},
	{name:'上海',value:11},
	{name:'四川',value:9 },
	{name:'天津',value:1 },
	{name:'西藏',value:13},
	{name:'新疆',value:10},
	{name:'云南',value:10},
	{name:'浙江',value:18},
	{name:'重庆',value:20},
]

//2017 电信
var mapData2017_dx=[
	{name:'安徽',value:18},
	{name:'北京',value:21},
	{name:'福建',value:24},
	{name:'甘肃',value:5 },
	{name:'广东',value:37},
	{name:'广西',value:25},
	{name:'贵州',value:24},
	{name:'海南',value:40},
	{name:'河北',value:6 },
	{name:'河南',value:9 },
	{name:'黑龙江',value:9 },
	{name:'湖北',value:8 },
	{name:'湖南',value:11},
	{name:'吉林',value:10},
	{name:'江苏',value:43},
	{name:'江西',value:12},
	{name:'辽宁',value:12},
	{name:'内蒙古',value:9 },
	{name:'宁夏',value:20},
	{name:'青海',value:9 },
	{name:'山东',value:24},
	{name:'山西',value:6 },
	{name:'陕西',value:39},
	{name:'上海',value:29},
	{name:'四川',value:31},
	{name:'天津',value:10},
	{name:'西藏',value:11},
	{name:'新疆',value:12},
	{name:'云南',value:20},
	{name:'浙江',value:41},
	{name:'重庆',value:49},
]
//2016 联通
var mapData2016_lt=[
	{name:'安徽',value:4 },
	{name:'北京',value:4 },
	{name:'福建',value:7 },
	{name:'广西',value:6 },
	{name:'贵州',value:9 },
	{name:'海南',value:9 },
	{name:'河北',value:15},
	{name:'河南',value:3 },
	{name:'黑龙江',value:4 },
	{name:'湖南',value:13},
	{name:'吉林',value:3 },
	{name:'江苏',value:11},
	{name:'江西',value:2 },
	{name:'辽宁',value:21},
	{name:'内蒙古',value:6 },
	{name:'宁夏',value:10},
	{name:'青海',value:2 },
	{name:'山东',value:5 },
	{name:'山西',value:14},
	{name:'重庆',value:13},
	{name:'陕西',value:11},
	{name:'上海',value:8 },
	{name:'四川',value:24},
	{name:'天津',value:9 },
	{name:'浙江',value:2 },
	{name:'新疆',value:12},
	{name:'湖北',value:9 },
	{name:'甘肃',value:5 },
	{name:'云南',value:4 },
	{name:'广东',value:1 },
	{name:'西藏',value:2 },
]

//2016 移动
var mapData2016_yd=[
	{name:'北京',value:46},
	{name:'天津',value:6 },
	{name:'河北',value:8 },
	{name:'山西',value:8 },
	{name:'内蒙古',value:24},
	{name:'辽宁',value:19},
	{name:'吉林',value:8 },
	{name:'黑龙江',value:8 },
	{name:'上海',value:13},
	{name:'江苏',value:9 },
	{name:'浙江',value:24},
	{name:'安徽',value:5 },
	{name:'福建',value:4 },
	{name:'江西',value:8 },
	{name:'山东',value:24},
	{name:'河南',value:16},
	{name:'湖北',value:8 },
	{name:'湖南',value:10},
	{name:'广东',value:20},
	{name:'广西',value:11},
	{name:'海南',value:4 },
	{name:'重庆',value:11},
	{name:'四川',value:48},
	{name:'贵州',value:20},
	{name:'云南',value:20},
	{name:'西藏',value:6 },
	{name:'陕西',value:9 },
	{name:'甘肃',value:16},
	{name:'宁夏',value:3 },
	{name:'青海',value:11},
	{name:'新疆',value:4 },
]

//2017 移动
var mapData2017_yd=[
	{name:'北京',value:59},
	{name:'天津',value:29},
	{name:'河北',value:26},
	{name:'山西',value:15},
	{name:'内蒙古',value:10},
	{name:'辽宁',value:30},
	{name:'吉林',value:10},
	{name:'黑龙江',value:18},
	{name:'上海',value:27},
	{name:'江苏',value:13},
	{name:'浙江',value:20},
	{name:'安徽',value:9 },
	{name:'福建',value:23},
	{name:'江西',value:14},
	{name:'山东',value:33},
	{name:'河南',value:63},
	{name:'湖北',value:9 },
	{name:'湖南',value:26},
	{name:'广东',value:31},
	{name:'广西',value:43},
	{name:'海南',value:19},
	{name:'重庆',value:19},
	{name:'四川',value:17},
	{name:'贵州',value:30},
	{name:'云南',value:66},
	{name:'西藏',value:6 },
	{name:'陕西',value:26},
	{name:'甘肃',value:19},
	{name:'宁夏',value:13},
	{name:'青海',value:14},
	{name:'新疆',value:34}
]

var geoCoordMap={}
var mapFeatures = echarts.getMap('china').geoJson.features;
mapFeatures.forEach(function(v) {
    // 地区名称
    var name = v.properties.name;
    // 地区经纬度
    geoCoordMap[name] = v.properties.cp;
});
var convertData = function (data) {
    var res = [];
    for (var i = 0; i < data.length; i++) {
        var geoCoord = geoCoordMap[data[i].name];
        if (geoCoord) {
            res.push({
                name: data[i].name,
                value: geoCoord.concat(data[i].value)
            });
        }
    }
    return res;
};
function getOptionMap(data,type,max){
	var optionMap = {
			tooltip : {
				trigger : 'item',
				formatter : function(param) {
					// console.log(param)
					return '<div>' + param.name + '</div>' + 
							'<div>企业数量：'+ param.data.value[2] + '</div>';
				}
			},
			geo : {
				show : true,
				zoom : 1.2,
				roam : false,
				map : 'china',
				itemStyle : {
					normal : {
						show : false,
						borderColor : '#285ac6',
						borderWidth : 1,
						areaColor : '#123082',
						shadowBlur : 3,
						shadowColor : '#081435',
						shadowOffsetX : -4,
						shadowOffsetY : 8
					},
					emphasis : {
						areaColor : '#fce24f',
						borderColor : '#fce24f'
					}
				}
			},
			series : [ {
				type : 'map',
				zoom : 1.2,
				mapType : 'china',
				// geoIndex: 0,
				roam : false,
				label : {
					normal : {
						show : false,
						textStyle : {
							color : '#fff'
						}
					},
					emphasis : {
						show : true,
						textStyle : {
							color : '#fff'
						}
					}
				},
				itemStyle : {
					normal : {
						show : false,
						borderColor : '#3770ea',
						borderWidth : 1,
						areaColor : '#0f2d87'
					},
					emphasis : {
						areaColor : '#2a56bd',
						borderColor : '#2a56bd',
					// opacity: 0.8,
					}
				},
				data : convertData(data)
			}, {
				name : 'Top 5',
				type : 'effectScatter',
				zlevel : 1,
				coordinateSystem : 'geo',
				symbolSize : function(val) {
					return val[2] / max * 15 + 9
				},
				showEffectOn : 'render',
				rippleEffect : {
					brushType : 'stroke'
				},
				hoverAnimation : true,
				label : {
					normal : {
						// formatter: '{b}',
						position : 'right',
						show : false
					}
				},
				itemStyle : {
					normal : {
						color : '#f4e925',
						shadowBlur : 10,
						shadowColor : '#333'
					}
				},
				// data: convertData(mapData)
				data : convertData(data.sort(function(a, b) {
					return b.value - a.value
				}).slice(0, 5))
			}, {
				name : 'Top 5',
				type : 'scatter',
				zlevel : 1,
				coordinateSystem : 'geo',
				symbolSize : function(val) {
					return val[2] / max * 15 + 10 
				},
				showEffectOn : 'render',
				rippleEffect : {
					brushType : 'stroke'
				},
				hoverAnimation : true,
				label : {
					normal : {
						// formatter: '{b}',
						position : 'right',
						show : false
					}
				},
				itemStyle : {
					normal : {
						color : '#f4e925',
						shadowBlur : 10,
						shadowColor : '#333'
					}
				},
				// data: convertData(mapData)
				data : convertData(data.sort(function(a, b) {
					return b.value - a.value;
				}).slice(5))
			} ]
};
	return optionMap;
}

var mapChart = echarts.init(document.getElementById('ec_map'))
mapChart.setOption(getOptionMap(mapData2014_yd,'移动',35))

$("#mySelect").change(function(){
	var index = $("#mySelect").val();
	var year = $("#mySelect2").val();
	var optionMap = null;
	if(index == 1){//移动
		if(year == 2014){
			optionMap = getOptionMap(mapData2014_yd,'移动',35);
		}else if(year == 2015){
			optionMap = getOptionMap(mapData2015_yd,'移动',67);
		}else if(year == 2016){
			optionMap = getOptionMap(mapData2016_yd,'移动',48);
		}else if(year == 2017){
			optionMap = getOptionMap(mapData2017_yd,'移动',66);
		}
	}else if(index == 2){//联通
		if(year == 2014){
			optionMap = getOptionMap(mapData2014_lt,'联通',17);
		}else if(year == 2015){
			optionMap = getOptionMap(mapData2015_lt,'联通',33);
		}else if(year == 2016){
			optionMap = getOptionMap(mapData2016_lt,'联通',24);
		}
	}else{//电信
		if(year == 2014){
			optionMap = getOptionMap(mapData2014_dx,'电信',20);
		}else if(year == 2015){
			optionMap = getOptionMap(mapData2015_dx,'电信',41);
		}else if(year == 2016){
			optionMap = getOptionMap(mapData2016_dx,'电信',29);
		}else if(year == 2017){
			optionMap = getOptionMap(mapData2017_dx,'电信',49);
		}
	}
	mapChart.setOption(optionMap);
})


$("#mySelect2").change(function(){
	var year = $("#mySelect2").val();
	var index = $("#mySelect").val();
	var optionMap = null;
	
	if(year == 2014){
		if(index == 1){//移动
			optionMap = getOptionMap(mapData2014_yd,'移动',35);
		}else if(index == 2){//联通
			optionMap = getOptionMap(mapData2014_lt,'联通',17);
		}else{//电信
			optionMap = getOptionMap(mapData2014_dx,'电信',20);
		}
	}else if(year == 2015){
		if(index == 1){//移动
			optionMap = getOptionMap(mapData2015_yd,'移动',67);
		}else if(index == 2){//联通
			optionMap = getOptionMap(mapData2015_lt,'联通',33);
		}else{//电信
			optionMap = getOptionMap(mapData2015_dx,'电信',41);
		}
	}else if(year == 2016){
		if(index == 1){//移动
			optionMap = getOptionMap(mapData2016_yd,'移动',48);
		}else if(index == 2){//联通
			optionMap = getOptionMap(mapData2016_lt,'联通',24);
		}else{//电信
			optionMap = getOptionMap(mapData2016_dx,'电信',29);
		}
	}else if(year == 2016){
		if(index == 1){//移动
			optionMap = getOptionMap(mapData2017_yd,'移动',66);
		}else if(index == 2){//联通
			//optionMap = getOptionMap(mapData2017_lt,'联通',24);
		}else{//电信
			optionMap = getOptionMap(mapData2017_dx,'电信',49);
		}
	}
	mapChart.setOption(optionMap);
})

var comm = '<ul><li>年份</li><li>2014</li><li>2015</li><li>2016</li></ul>';

var beijing = '<ul><li>北京电信</li><li>5.815</li><li>5.88</li><li>5.91</li></ul>'+
			 '<ul><li>北京联通</li><li>5.675</li><li>5.85</li><li>5.73</li></ul>'+
			 '<ul><li>北京移动</li><li>5.7</li><li>5.86</li><li>5.97</li></ul>';

var tianjin = '<ul><li>天津电信</li><li>5.802</li><li>5.98</li><li>5.96</li></ul>'+
			 '<ul><li>天津联通</li><li>5.692</li><li>5.98</li><li>5.92</li></ul>'+
			 '<ul><li>天津移动</li><li>5.827</li><li>5.972</li><li>5.99</li></ul>';

var shanghai = '<ul><li>上海电信</li><li>5.9</li><li>5.863</li><li>5.85</li></ul>'+
				'<ul><li>上海联通</li><li>5.795</li><li>5.702</li><li>5.91</li></ul>'+
				'<ul><li>上海移动</li><li>5.945</li><li>5.933</li><li>5.95</li></ul>';

var chongqing = '<ul><li>重庆电信</li><li>5.413</li><li>5.477</li><li>5.64</li></ul>'+
				'<ul><li>重庆联通</li><li>5.642</li><li>5.604</li><li>5.512</li></ul>'+
				'<ul><li>重庆移动</li><li>5.803</li><li>5.893</li><li>5.96</li></ul>';

var hebei = '<ul><li>河北电信</li><li>5.835</li><li>5.523</li><li>5.555</li></ul>'+
			'<ul><li>河北联通</li><li>5.677</li><li>5.767</li><li>5.37</li></ul>'+
			'<ul><li>河北移动</li><li>5.598</li><li>5.907</li><li>5.75</li></ul>';

var henan = '<ul><li>河南电信</li><li>5.773</li><li>5.777</li><li>5.96</li></ul>'+
			'<ul><li>河南联通</li><li>5.78</li><li>5.953</li><li>5.925</li></ul>'+
			'<ul><li>河南移动</li><li>5.82</li><li>5.96</li><li>5.5</li></ul>';

var yunnan = '<ul><li>云南电信</li><li>5.776</li><li>5.916</li><li>5.866</li></ul>'+
			'<ul><li>云南联通</li><li>5.836</li><li>5.95</li><li>5.484</li></ul>'+
			'<ul><li>云南移动</li><li>5.98</li><li>5.98</li><li>5.95</li></ul>';

var liaoning = '<ul><li>辽宁电信</li><li>5.935</li><li>5.307</li><li>5.73</li></ul>'+
				'<ul><li>辽宁联通</li><li>5.56</li><li>5.527</li><li>5.5</li></ul>'+
				'<ul><li>辽宁移动</li><li>5.94</li><li>5.98</li><li>6</li></ul>';

var heilongjiang = '<ul><li>黑龙江电信</li><li>5.835</li><li>5.88</li><li>5.765</li></ul>'+
					'<ul><li>黑龙江联通</li><li>5.595</li><li>5.913</li><li>5.58</li></ul>'+
					'<ul><li>黑龙江移动</li><li>5.8</li><li>5.933</li><li>5.985</li></ul>';

var hunan = '<ul><li>湖南电信</li><li>5.9</li><li>5.96</li><li>5.77</li></ul>'+
			'<ul><li>湖南联通</li><li>5.703</li><li>5.893</li><li>5.82</li></ul>'+
			'<ul><li>湖南移动</li><li>5.9</li><li>5.9</li><li>6</li></ul>';

var anhui = '<ul><li>安徽电信</li><li>5.8</li><li>5.67</li><li>5.89</li></ul>'+
			'<ul><li>安徽联通</li><li>5.7</li><li>5.88</li><li>5.85</li></ul>'+
			'<ul><li>安徽移动</li><li>5.9</li><li>5.93</li><li>6</li></ul>';

var shandong = '<ul><li>山东电信</li><li>5.678</li><li>5.82</li><li>5.72</li></ul>'+
			   '<ul><li>山东联通</li><li>5.507</li><li>5.63</li><li>5.933</li></ul>'+
			   '<ul><li>山东移动</li><li>5.92</li><li>5.721</li><li>5.8</li></ul>';

var xinjiang = '<ul><li>新疆电信</li><li>5.87</li><li>5.85</li><li>5.84</li></ul>'+
				'<ul><li>新疆联通</li><li>5.685</li><li>5.917</li><li>5.648</li></ul>'+
				'<ul><li>新疆移动</li><li>5.88</li><li>5.81</li><li>5.98</li></ul>';

var jiangsu = '<ul><li>江苏电信</li><li>5.84</li><li>5.907</li><li>5.94</li></ul>'+
				'<ul><li>江苏联通</li><li>5.82</li><li>5.88</li><li>5.57</li></ul>'+
				'<ul><li>江苏移动</li><li>5.83</li><li>5.877</li><li>5.93</li></ul>';

var zhejinag = '<ul><li>浙江电信</li><li>5.92</li><li>5.92</li><li>5.721</li></ul>'+
				'<ul><li>浙江联通</li><li>5.82</li><li>5.843</li><li>5.648</li></ul>'+
				'<ul><li>浙江移动</li><li>5.92</li><li>5.92</li><li>5.96</li></ul>';

var jiangxi = '<ul><li>江西电信</li><li>5.73</li><li>5.863</li><li>5.77</li></ul>'+
				'<ul><li>江西联通</li><li>5.25</li><li>5.897</li><li>5.56</li></ul>'+
				'<ul><li>江西移动</li><li>5.65</li><li>5.957</li><li>5.925</li></ul>';

var hubei = '<ul><li>湖北电信</li><li>5.635</li><li>5.613</li><li>5.68</li></ul>'+
			'<ul><li>湖北联通</li><li>5.715</li><li>5.81</li><li>5.24</li></ul>'+
			'<ul><li>湖北移动</li><li>5.798</li><li>5.9</li><li>5.9</li></ul>';

var guangxi = '<ul><li>广西电信</li><li>5.646</li><li>5.79</li><li>5.86</li></ul>'+
			'<ul><li>广西联通</li><li>5.66</li><li>5.78</li><li>5.62</li></ul>'+
			'<ul><li>广西移动</li><li>5.86</li><li>5.913</li><li>6</li></ul>';

var gansu = '<ul><li>甘肃电信</li><li>5.685</li><li>5.803</li><li>5.375</li></ul>'+
			'<ul><li>甘肃联通</li><li>5.25</li><li>5.257</li><li>5.53</li></ul>'+
			'<ul><li>甘肃移动</li><li>5.76</li><li>5.94</li><li>5.95</li></ul>';

var shanxi ='<ul><li>山西电信</li><li>5.84</li><li>5.7</li><li>5.703</li></ul>'+
			'<ul><li>山西联通</li><li>5.672</li><li>5.76</li><li>5.717</li></ul>'+
			'<ul><li>山西移动</li><li>5.87</li><li>5.963</li><li>6</li></ul>';

var neimenggu = '<ul><li>内蒙古电信</li><li>5.8</li><li>5.873</li><li>5.563</li></ul>'+
				'<ul><li>内蒙古联通</li><li>5.666</li><li>5.718</li><li>5.237</li></ul>'+
				'<ul><li>内蒙古移动</li><li>5.84</li><li>5.94</li><li>5.99</li></ul>';

var shangxi = '<ul><li>陕西电信</li><li>5.681</li><li>5.778</li><li>5.515</li></ul>'+
				'<ul><li>陕西联通</li><li>5.152</li><li>5.781</li><li>4.158</li></ul>'+
				'<ul><li>陕西移动</li><li>5.92</li><li>5.96</li><li>5.96</li></ul>';

var jilin = '<ul><li>吉林电信</li><li>5.406</li><li>5.513</li><li>5.695</li></ul>'+
			'<ul><li>吉林联通</li><li>5.64</li><li>5.55</li><li>5.613</li></ul>'+
			'<ul><li>吉林移动</li><li>5.82</li><li>5.96</li><li>5.98</li></ul>';


var fujian = '<ul><li>福建电信</li><li>5.52</li><li>5.91</li><li>5.893</li></ul>'+
			'<ul><li>福建联通</li><li>5.602</li><li>5.118</li><li>5.938</li></ul>'+
			'<ul><li>福建移动</li><li>5.764</li><li>5.955</li><li>5.925</li></ul>';

var guizhou = '<ul><li>贵州电信</li><li>5.748</li><li>5.823</li><li>5.004</li></ul>'+
			'<ul><li>贵州联通</li><li>5.643</li><li>5.992</li><li>5.184</li></ul>'+
			'<ul><li>贵州移动</li><li>5.92</li><li>5.82</li><li>5.87</li></ul>';

var guangdong = '<ul><li>广东电信</li><li>5.6</li><li>5.513</li><li>5.832</li></ul>'+
				'<ul><li>广东联通</li><li>5.529</li><li>5.63</li><li>4.721</li></ul>'+
				'<ul><li>广东移动</li><li>5.7</li><li>5.88</li><li>6</li></ul>';


var qinghai = '<ul><li>青海电信</li><li>5.524</li><li>5.833</li><li>5.708</li></ul>'+
				'<ul><li>青海联通</li><li>5.72</li><li>5.92</li><li>5.493</li></ul>'+
				'<ul><li>青海移动</li><li>5.696</li><li>5.92</li><li>5.97</li></ul>';

var xizang = '<ul><li>西藏电信</li><li>5.149</li><li>5.752</li><li>4.593</li></ul>'+
			'<ul><li>西藏联通</li><li>5.855</li><li>5.821</li><li>5.69</li></ul>'+
			'<ul><li>西藏移动</li><li>5.8</li><li>5.869</li><li>5.99</li></ul>';

var sichuang = '<ul><li>四川电信</li><li>5.509</li><li>5.82</li><li>4.995</li></ul>'+
				'<ul><li>四川联通</li><li>5.536</li><li>5.96</li><li>5.608</li></ul>'+
				'<ul><li>四川移动</li><li>5.884</li><li>6</li><li>5.97</li></ul>';

var ningxia = '<ul><li>宁夏电信</li><li>5.154</li><li>5.87</li><li>5.69</li></ul>'+
				'<ul><li>宁夏联通</li><li>5.496</li><li>5.79</li><li>5.629</li></ul>'+
				'<ul><li>宁夏移动</li><li>5.848</li><li>6</li><li> 5.92</li></ul>';

var hainan = '<ul><li>海南电信</li><li>5.768</li><li>5.79</li><li>5.064</li></ul>'+
			'<ul><li>海南联通</li><li>5.768</li><li>5.752</li><li>5.585</li></ul>'+
			'<ul><li>海南移动</li><li>5.909</li><li>5.98</li><li>5.9</li></ul>';


/*mapChart.on('click',function(param){
	var name = param.name;
	$("#win_div").empty();
	if(name == '北京'){
		$("#win_div").append(comm).append(beijing);
	}else if(name == '天津'){
		$("#win_div").append(comm).append(tianjin);
	}else if(name == '上海'){
		$("#win_div").append(comm).append(shanghai);
	}else if(name == '重庆'){
		$("#win_div").append(comm).append(chongqing);
	}else if(name == '河北'){
		$("#win_div").append(comm).append(hebei);
	}else if(name == '河南'){
		$("#win_div").append(comm).append(henan);
	}else if(name == '云南'){
		$("#win_div").append(comm).append(yunnan);
	}else if(name == '辽宁'){
		$("#win_div").append(comm).append(liaoning);
	}else if(name == '黑龙江'){
		$("#win_div").append(comm).append(heilongjiang);
	}else if(name == '湖南'){
		$("#win_div").append(comm).append(hunan);
	}else if(name == '安徽'){
		$("#win_div").append(comm).append(anhui);
	}else if(name == '山东'){
		$("#win_div").append(comm).append(shandong);
	}else if(name == '新疆'){
		$("#win_div").append(comm).append(xinjiang);
	}else if(name == '江苏'){
		$("#win_div").append(comm).append(jiangsu);
	}else if(name == '浙江'){
		$("#win_div").append(comm).append(zhejinag);
	}else if(name == '江西'){
		$("#win_div").append(comm).append(jiangxi);
	}else if(name == '湖北'){
		$("#win_div").append(comm).append(hubei);
	}else if(name == '广西'){
		$("#win_div").append(comm).append(guangxi);
	}else if(name == '甘肃'){
		$("#win_div").append(comm).append(gansu);
	}else if(name == '山西'){
		$("#win_div").append(comm).append(shanxi);
	}else if(name == '内蒙古'){
		$("#win_div").append(comm).append(neimenggu);
	}else if(name == '陕西'){
		$("#win_div").append(comm).append(shangxi);
	}else if(name == '吉林'){
		$("#win_div").append(comm).append(jilin);
	}else if(name == '福建'){
		$("#win_div").append(comm).append(fujian);
	}else if(name == '贵州'){
		$("#win_div").append(comm).append(guizhou);
	}else if(name == '广东'){
		$("#win_div").append(comm).append(guangdong);
	}else if(name == '青海'){
		$("#win_div").append(comm).append(qinghai);
	}else if(name == '西藏'){
		$("#win_div").append(comm).append(xizang);
	}else if(name == '四川'){
		$("#win_div").append(comm).append(sichuang);
	}else if(name == '宁夏'){
		$("#win_div").append(comm).append(ningxia);
	}else if(name == '海南'){
		$("#win_div").append(comm).append(hainan);
	}
	$(".mapWinOpen").fadeIn();
})*/

$(".mapWinClose").on('click',function(){
	$(".mapWinOpen").fadeOut();
})

$(".win_shade").on('click',function(){
	$(".mapWinOpen").fadeOut();
})

//饼图

var dataDx=[
	{name:'即时通信、搜索引擎和信息社区',value:48},
	{name:'应用商店、电商平台',value:21},
	{name:'云计算、CDN',value:22},
	{name:'虚拟专网、VPN',value:22},
	{name:'智慧城市、三网融合',value:24},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:29},
	{name:'其他',value:5},
]

var dataDx_2015=[
	{name:'即时通信、搜索引擎和信息社区',value:85},
	{name:'应用商店、电商平台',value:38},
	{name:'云计算、CDN',value:44},
	{name:'虚拟专网、VPN',value:35},
	{name:'智慧城市、三网融合',value:44},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:53},
	{name:'其他',value:16},
]

var dataDx_2016=[
	{name:'即时通信、搜索引擎和信息社区',value:76},
	{name:'应用商店、电商平台',value:44},
	{name:'云计算、CDN',value:44},
	{name:'虚拟专网、VPN',value:41},
	{name:'智慧城市、三网融合',value:44},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:35},
	{name:'其他',value:9},
]

var dataDx_2017=[
	{name:'即时通信、搜索引擎和信息社区',value:173},
	{name:'应用商店、电商平台',value:109},
	{name:'云计算、CDN',value:115},
	{name:'虚拟专网、VPN',value:64},
	{name:'智慧城市、三网融合',value:102},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:64},
	{name:'其他',value:13},
]
var dataLt=[
	{name:'即时通信、搜索引擎和信息社区',value:39},
	{name:'应用商店、电商平台',value:26},
	{name:'云计算、CDN',value:24},
	{name:'虚拟专网、VPN',value:28},
	{name:'智慧城市、三网融合',value:24},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:37},
	{name:'其他',value:7},
]

var dataLt_2015=[
	{name:'即时通信、搜索引擎和信息社区',value:76},
	{name:'应用商店、电商平台',value:46},
	{name:'云计算、CDN',value:49},
	{name:'虚拟专网、VPN',value:43},
	{name:'智慧城市、三网融合',value:46},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:59},
	{name:'其他',value:10},
]

var dataLt_2016=[
	{name:'即时通信、搜索引擎和信息社区',value:60},
	{name:'应用商店、电商平台',value:40},
	{name:'云计算、CDN',value:30},
	{name:'虚拟专网、VPN',value:32},
	{name:'智慧城市、三网融合',value:42},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:40},
	{name:'其他',value:5},
]

var dataLt_2017=[
	{name:'即时通信、搜索引擎和信息社区',value:110},
	{name:'应用商店、电商平台',value:74},
	{name:'云计算、CDN',value:57},
	{name:'虚拟专网、VPN',value:48},
	{name:'智慧城市、三网融合',value:74},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:57},
	{name:'其他',value:18},
]
var dataYd=[
	{name:'即时通信、搜索引擎和信息社区',value:64},
	{name:'应用商店、电商平台',value:36},
	{name:'云计算、CDN ',value:33},
	{name:'虚拟专网、VPN',value:33},
	{name:'智慧城市、三网融合',value:38},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:38},
	{name:'其他',value:13},
]

var dataYd_2015=[
	{name:'即时通信、搜索引擎和信息社区',value:132},
	{name:'应用商店、电商平台',value:64},
	{name:'云计算、CDN ',value:73},
	{name:'虚拟专网、VPN',value:59},
	{name:'智慧城市、三网融合',value:78},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:68},
	{name:'其他',value:15},
]

var dataYd_2016=[
	{name:'即时通信、搜索引擎和信息社区',value:112},
	{name:'应用商店、电商平台',value:60},
	{name:'云计算、CDN ',value:69},
	{name:'虚拟专网、VPN',value:60},
	{name:'智慧城市、三网融合',value:78},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:43},
	{name:'其他',value:9},
]

var dataYd_2017=[
	{name:'即时通信、搜索引擎和信息社区',value:200},
	{name:'应用商店、电商平台',value:123},
	{name:'云计算、CDN ',value:131},
	{name:'虚拟专网、VPN',value:77},
	{name:'智慧城市、三网融合',value:131},
	{name:'语音专线、并发语音呼叫、码号资源绑定类、网短厅',value:77},
	{name:'其他',value:31},
]
var dataAll=[{value:2335, name:'网络安全应急保障'},
             {value:2310, name:'通讯信息诈骗专项工作'},
             {value:2234, name:'特殊通信配合'},
             {value:2135, name:'新技术新业务安全评估'},
             {value:2548, name:'IDC/ISP信息安全技术管理系统'},
             {value:2348, name:'移动上网日志留存工作'},
             {value:2548, name:'属地化网络信息安全监管'},
             {value:3548, name:'电话用户实名登记'},
             {value:3548, name:'网络安全防护'},
             {value:4548, name:'网络安全威胁治理'},
             {value:5548, name:'网络安全组织保障'}]


var pieOption = function(){
	return {
		color : ["#00a9e1","#560081","#af0058", "#ff8700", "#ffe34e", "#93dd6e","#0046af","#360293"],
    title : {
    	show:false,
	    text: '某站点用户访问来源',
	    subtext: '纯属虚构',
	    x:'center'
    },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    legend: {
    	show:false,
    		top:'top',
    		right:'5%',
    		textStyle:{
    			color: 'rgba(255,255,255,0.8)'
    		},
        orient: 'vertical',
//      data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
    },
    series : [
        {
          name: '',
          type: 'pie',
          radius : '55%',
          center: ['50%', '50%'],
//          data: 
			label: {
                normal: {
                    show: true,
                    formatter: function(param) {
    					console.log(param)
    					return echarts.format.truncateText(param.name, 200)
    				}
                }
            },
          itemStyle: {
              normal:{
                  label:{
                      color:'#fff',
                  }
              },
              emphasis: {
                  shadowBlur: 10,
                  shadowOffsetX: 0,
                  shadowColor: 'rgba(0, 0, 0, 0.5)'
              }
          }
        }
    ]
	}
}

function legendData(data){
	var arr=[];
	for(var i=0;i<data.length;i++){
		arr.push(data[i].name)
	}
	return arr
}


var dataAll2=[{value:335, name:'发布传播违法有害信息'},
    {value:310, name:'用户个人信息保护策略措施缺失不足'},
    {value:234, name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持'},
    {value:135, name:'无法配合溯源和执法协助'},
    {value:1548, name:'缺失违法有害信息监测审核处置技术能力'},
    {value:1648, name:'其他'}]

var dataYd2=[
	{name:'发布传播违法有害信息',value:170},
	{name:'用户个人信息保护策略措施缺失不足',value:156},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:102},
	{name:'无法配合溯源和执法协助',value:95},
	{name:'缺失违法有害信息监测审核处置技术能力',value:122},
	{name:'其他',value:34},
]

var dataYd2_2015=[
	{name:'发布传播违法有害信息',value:350},
	{name:'用户个人信息保护策略措施缺失不足',value:395},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:213},
	{name:'无法配合溯源和执法协助',value:243},
	{name:'缺失违法有害信息监测审核处置技术能力',value:258},
	{name:'其他',value:61},
]

var dataYd2_2016=[
	{name:'发布传播违法有害信息',value:362},
	{name:'用户个人信息保护策略措施缺失不足',value:391},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:174},
	{name:'无法配合溯源和执法协助',value:188},
	{name:'缺失违法有害信息监测审核处置技术能力',value:275},
	{name:'其他',value:58},
]

var dataYd2_2017=[
	{name:'发布传播违法有害信息',value:713},
	{name:'用户个人信息保护策略措施缺失不足',value:744},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:434},
	{name:'无法配合溯源和执法协助',value:465},
	{name:'缺失违法有害信息监测审核处置技术能力',value:558},
	{name:'其他',value:186},
]
var dataLt2=[
	{name:'发布传播违法有害信息',value:91},
	{name:'用户个人信息保护策略措施缺失不足',value:99},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:51},
	{name:'无法配合溯源和执法协助',value:71},
	{name:'缺失违法有害信息监测审核处置技术能力',value:59},
	{name:'其他',value:24},
]

var dataLt2_2015=[
	{name:'发布传播违法有害信息',value:169},
	{name:'用户个人信息保护策略措施缺失不足',value:176},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:102},
	{name:'无法配合溯源和执法协助',value:95},
	{name:'缺失违法有害信息监测审核处置技术能力',value:115},
	{name:'其他',value:20},
]

var dataLt2_2016=[
	{name:'发布传播违法有害信息',value:151},
	{name:'用户个人信息保护策略措施缺失不足',value:134},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:76},
	{name:'无法配合溯源和执法协助',value:93},
	{name:'缺失违法有害信息监测审核处置技术能力',value:105},
	{name:'其他',value:23},
]
var dataLt2_2017=[
	{name:'发布传播违法有害信息',value:243},
	{name:'用户个人信息保护策略措施缺失不足',value:278},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:127},
	{name:'无法配合溯源和执法协助',value:208},
	{name:'缺失违法有害信息监测审核处置技术能力',value:255},
	{name:'其他',value:46},
]
var dataDx2=[
	{name:'发布传播违法有害信息',value:170},
	{name:'用户个人信息保护策略措施缺失不足',value:156},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:102},
	{name:'无法配合溯源和执法协助',value:95},
	{name:'缺失违法有害信息监测审核处置技术能力',value:122},
	{name:'其他',value:34},
]

var dataDx2_2015=[
	{name:'发布传播违法有害信息',value:210},
	{name:'用户个人信息保护策略措施缺失不足',value:264},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:118},
	{name:'无法配合溯源和执法协助',value:137},
	{name:'缺失违法有害信息监测审核处置技术能力',value:164},
	{name:'其他',value:18},
]

var dataDx2_2016=[
	{name:'发布传播违法有害信息',value:263},
	{name:'用户个人信息保护策略措施缺失不足',value:273},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:111},
	{name:'无法配合溯源和执法协助',value:142},
	{name:'缺失违法有害信息监测审核处置技术能力',value:192},
	{name:'其他',value:30},
]

var dataDx2_2017=[
	{name:'发布传播违法有害信息',value:725},
	{name:'用户个人信息保护策略措施缺失不足',value:857},
	{name:'为组织实施网络违法犯罪提供信息传播和工具售卖支持',value:264},
	{name:'无法配合溯源和执法协助',value:560},
	{name:'缺失违法有害信息监测审核处置技术能力',value:692},
	{name:'其他',value:198},
]
var n=0
$(".right_content_bottom .tabType li").click(function() {
	n = $(this).index()
	$(this).addClass("active").siblings().removeClass("active")
	if (n == 0) {
		var pieYd = pieOption();
		pieYd.series[0].data = dataYd;
		pieYd.legend.data = legendData(dataYd);
		pieMiddleChart.setOption(pieYd);
	} else if (n == 1) {
		var pieYd = pieOption();
		pieYd.series[0].data = dataYd2;
		pieYd.legend.data = legendData(dataYd2);
		pieMiddleChart.setOption(pieYd);
	}
})

var pieYd=pieOption();
pieYd.series[0].data=dataYd;
pieYd.legend.data=legendData(dataYd);
var pieMiddleChart = echarts.init(document.getElementById('techPie'))
pieMiddleChart.setOption(pieYd);

$(".caCheck").change(function(){
	var index=$(".caCheck").val();
	var year = $("#mySelect4").val();
	if(n==0){//业务类型
		//第一个选项卡
		var pie=pieOption();
		var datas = null;
		if(year == '2014'){
			if(index=='移动'){
				datas = dataYd;
			}else if(index=='联通'){
				datas = dataLt;
			}else if(index == '电信'){
				datas = dataDx;
			}
		}else if(year == '2015'){
			if(index=='移动'){
				datas = dataYd_2015;
			}else if(index=='联通'){
				datas = dataLt_2015;
			}else if(index == '电信'){
				datas = dataDx_2015;
			}
		}else if(year == '2016'){
			if(index=='移动'){
				datas = dataYd_2016;
			}else if(index=='联通'){
				datas = dataLt_2016;
			}else if(index == '电信'){
				datas = dataDx_2016;
			}
		}else if(year == '2017'){
			if(index=='移动'){
				datas = dataYd_2017;
			}else if(index=='联通'){
				datas = dataLt_2017;
			}else if(index == '电信'){
				datas = dataDx_2017;
			}
		}
		pie.series[0].data=datas;
		pie.legend.data=legendData(datas);
		pieMiddleChart.setOption(pie);
	}else if(n==1){//风险类型
		var pie=pieOption();
		var datas = null;
		if(year == '2014'){
			if(index=='移动'){
				datas = dataYd2;
			}else if(index=='联通'){
				datas = dataLt2;
			}else if(index == '电信'){
				datas = dataDx2;
			}
		}else if(year == '2015'){
			if(index=='移动'){
				datas = dataYd2_2015;
			}else if(index=='联通'){
				datas = dataLt2_2015;
			}else if(index == '电信'){
				datas = dataDx2_2015;
			}
		}else if(year == '2016'){
			if(index=='移动'){
				datas = dataYd2_2016;
			}else if(index=='联通'){
				datas = dataLt2_2016;
			}else if(index == '电信'){
				datas = dataDx2_2016;
			}
		}else if(year == '2017'){
			if(index=='移动'){
				datas = dataYd2_2017;
			}else if(index=='联通'){
				datas = dataLt2_2017;
			}else if(index == '电信'){
				datas = dataDx2_2017;
			}
		}
		pie.series[0].data=datas;
		pie.legend.data=legendData(datas);
		pieMiddleChart.setOption(pie);
	}
})

$("#mySelect4").change(function(){
	var index=$(".caCheck").val();
	var year = $("#mySelect4").val();
	if(n==0){//业务类型
		//第一个选项卡
		var pie=pieOption();
		var datas = null;
		if(year == '2014'){
			if(index=='移动'){
				datas = dataYd;
			}else if(index=='联通'){
				datas = dataLt;
			}else if(index == '电信'){
				datas = dataDx;
			}
		}else if(year == '2015'){
			if(index=='移动'){
				datas = dataYd_2015;
			}else if(index=='联通'){
				datas = dataLt_2015;
			}else if(index == '电信'){
				datas = dataDx_2015;
			}
		}else if(year == '2016'){
			if(index=='移动'){
				datas = dataYd_2016;
			}else if(index=='联通'){
				datas = dataLt_2016;
			}else if(index == '电信'){
				datas = dataDx_2016;
			}
		}else if(year == '2017'){
			if(index=='移动'){
				datas = dataYd_2017;
			}else if(index=='联通'){
				datas = dataLt_2017;
			}else if(index == '电信'){
				datas = dataDx_2017;
			}
		}
		pie.series[0].data=datas;
		pie.legend.data=legendData(datas);
		pieMiddleChart.setOption(pie);
	}else if(n==1){//风险类型
		var pie=pieOption();
		var datas = null;
		if(year == '2014'){
			if(index=='移动'){
				datas = dataYd2;
			}else if(index=='联通'){
				datas = dataLt2;
			}else if(index == '电信'){
				datas = dataDx2;
			}
		}else if(year == '2015'){
			if(index=='移动'){
				datas = dataYd2_2015;
			}else if(index=='联通'){
				datas = dataLt2_2015;
			}else if(index == '电信'){
				datas = dataDx2_2015;
			}
		}else if(year == '2016'){
			if(index=='移动'){
				datas = dataYd2_2016;
			}else if(index=='联通'){
				datas = dataLt2_2016;
			}else if(index == '电信'){
				datas = dataDx2_2016;
			}
		}else if(year == '2017'){
			if(index=='移动'){
				datas = dataYd2_2017;
			}else if(index=='联通'){
				datas = dataLt2_2017;
			}else if(index == '电信'){
				datas = dataDx2_2017;
			}
		}
		pie.series[0].data=datas;
		pie.legend.data=legendData(datas);
		pieMiddleChart.setOption(pie);
	}
})
window.addEventListener('resize',function(){
	pieMiddleChart.resize();
	mapChart.resize()
})